Figure element revising method

ABSTRACT

In revising a figure element, the figure element (C 2 ) to be revised is designated, the designated figure element (C 2  ) is displayed by a type of line or and color different from those of other figure elements, the figure elements (S 1 , C 1 ) used in defining the designated figure element (C 2 ) are displayed by a line of a different type and color, a message (M) which includes definition statements of the figure elements (S 1 , C 1 ), as well as a radius necessary for defining the figure element (C 2 ), is displayed on a display screen, and revision of the figure element is executed by referring to the display.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to a figure element revising method and, more particularly, to a figure element revising method for displaying and revising a group of figure elements including figure elements defined using figure elements that have already been defined.

2. Description of the Prior Art

In an automatic programming system for creating NC data using an automatic programming language such as APT or FAPT,

(a) a part program based on the automatic programming language is created by defining points, straight lines and circular arcs using simple symbols (this is referred to as "figure definition"), and then defining a tool path using the defined points, straight lines and circular arcs (referred to as "motion statement definition"), and

(b) the part program based on the automatic programming language is subsequently converted into NC data comprising NC data (EIA codes or ISO codes) in a format capable of being executed by an NC unit.

FIG. 6 is a view for describing figure definition statements. Figure definition of circles C₁, C₂, C₃, C₄ and straight lines S₁, S₂ is performed as follows using a keyboard or tablet:

    C.sub.1 =x.sub.1, y.sub.1, r.sub.1                         (1)

    S.sub.1 =P(x.sub.2,y.sub.n2), P(x.sub.3,y.sub.3)           (2)

    C.sub.2 =S.sub.1, C.sub.1, r.sub.4, B, I, R                (3)

    C.sub.3 =x.sub.5, y.sub.5, r.sub.5                         (4)

    C.sub.4 =S.sub.1, C.sub.1, C.sub.2, B, I, O, L             (5)

    S.sub.2 =C.sub.2, C.sub.3, A, A                            (6)

In the foregoing,

equation (1) signifies a circle C₁ of center (x₁,y₁) and radius r₁ ;

equation (2) signifies a straight line S₁ passing through two points (x₂,y₂), (x₃,y₃);

equation (3) signifies a circle C₂ of radius r₄ tangent to the straight line S₁ from below, internally tangent to the circle C₁ and located on the right side;

equation (4) signifies a circle C₃ of center (x₅,y₅) and radius r₅ ;

equation (5) signifies a circle C₄ tangent to the straight line S₁ from below, internally tangent to the circle C₁, externally tangent to the circle C₂ and located on the left side; and

equation (6) signifies a straight line (tangent) S₂ tangent to the circle C₂ from above and to the circle C₃ from above. The alphabetic character A represents a qualifier meaning "above", B a qualifier meaning "below", R a qualifier meaning "right", L a qualifier meaning "L", I a qualifier meaning "internally tangent", and O a qualifier meaning "externally tangent".

As described in the example of the figure definition statement of the prior-art set forth above, there are two methods of figure definition. A first definition method entails defining points, straight lines and circles using absolute numeric data. A point is defined as

    P=x, y

using the coordinates (x,y) of the point [see FIG.

7(a)]; a straight line is defined as

    S=P(x.sub.1,y.sub.1), P(x.sub.2,y.sub.2)

using the two points (x₁,y₁), (x₂,y₂) through which the straight line passes [see FIG. 7(b)]; and a circle is defined as

    C=x, y, r

using the coordinates (x,y) of the center of the circle and the radius r of the circle [see FIG. 7(c)]. A figure definition statement based on the first definition method shall be referred to as a first definition statement hereinafter.

The second definition method entails defining straight lines and circles using other points, straight lines and circles that have already been defined. For example, point P₁ [see FIG. 7(d)] is defined as follows:

    P.sub.1 =S, C, L

The straight lines S₁ [see FIG. 7(e)] is defined as follows, by way of example:

    S.sub.1 =C.sub.1, C.sub.2, A, A

(A is a qualifier meaning "above"); and the circle C [see FIG. 7(f)] is as follows, by way of example:

    C=S.sub.1, S.sub.2, S.sub.3, R, A, L

A figure definition statement based on the second definition method shall be referred to as a second definition statement, hereinafter various types of second definition statements are available, that is, they are not limited to the foregoing examples.

When figure definition is performed, the arrangement is such that a figure element is defined by the first definition statement, and another figure element is defined by the second definition statement using the figure element in accordance with the first definition statement.

There are cases where it is desired to modify a figure element (FIG. 6), such as the circle C₂, defined using an already defined figure element. In such case, the definition statement of circle C₂ is

    C.sub.2 =S.sub.1, C.sub.1, r.sub.4, B, I, R

Since definition is performed utilizing the figure elements S₁, C₁ based on the first definition statement, the figure elements S₁, C₁ and the radius r₄ must be revised in order to make the modification. However, the figure definition statement of each figure element is not displayed on the display screen, and there is no correspondence between the symbols (P_(i), S_(i), C_(i)) of the figures used by the figure definition statements and the figure elements painted on the display screen. Consequently, searching for figure elements and data utilized in the definition of the figure element desired to be modified is a troublesome operation, and making the revision is very difficult.

Accordingly, an object of the present invention is to provide a figure element revising method through which figure elements and data necessary for making a revision can be distinguished merely by designating the figure element desired to be modified, as a result of which revision of the figure element can be performed quickly and easily.

SUMMARY OF THE INVENTION

When a figure element to be revised is designated in figure element revision, the color and/or the type of line of the designated figure element are changed to display the element in a first mode, the color and/or the type of line of an already defined figure element used in the definition of the designated figure element is changed to display the figure element in a second mode, the figure definition statements and other data used in definition the figure element to be revised are displayed on a display screen, and figure element revision is executed by referring to the display.

BRIEF DESCRIPTION OF THE DRAWINGS

Fig 1 is a block diagram of an apparatus for practicing the present invention;

FIG. 2 is a view for describing the principal portion of a menu chart;

FIG. 3 is a flowchart of figure revision processing according to the invention;

FIGS. 4 and 5 for displays illustrating examples of conversational displays in figure revision processing according to the present invention; and

FIGS. 6 and 7(a)-(f) are views for describing an example of the prior art,

DESCRIPTION OF THE PREFERRED EMBODIMENT

FIG. 1 is a block diagram of an automatic programming apparatus for practicing the present invention.

Numeral 101 denotes a ROM storing a loading program and the like, 102 a processor for executing automatic programming processing, and 103 a RAM for storing a system program read in from a floppy FL, as well as various parameters and results of processing. Numeral 104 denotes an NC data memory for storing the finally created NC data having an executable format, 105 a keyboard, 106 a display unit (CRT), 107 a disc controller, and 108 a tablet device having a tablet surface 108a to which a menu chart 108b having menu items is affixed. Prescribed menu items are picked by a tablet cursor 108c. A graphic cursor on a display screen is moved by moving the cursor 108a on the tablet surface. FL represents a floppy disc.

FIG. 2 is a view for describing the principal parts of the menu chart 108b. Numeral 1 denotes a "POINT/POINT GROUP DEFINITION" section, 2 a "STRAIGHT LINE DEFINITION" section, 3 a "CIRCLE DEFINITION" section, 4 a "SPECIAL FIGURE DEFINITION" section and 5 a "FIGURE EDITING" section. The "FIGURE EDITING" section 5 includes an "ELEMENT CORRECTION" item 5a.

FIG. 3 is a flowchart of figure element revision processing according to the invention. The figure element revising method of the invention will now be described in accordance with this flowchart. The system program for creating the NC part program, parameters and the like have already been stored in the RAM 103 from the floppy disc FL.

The circles C₁, C₂ and straight line S₁ shown in FIG. 4 are defined by performing a direct coordinate input, or by citing figure elements displayed on the CRT 106, using the tablet 108 and keyboard 105. As for the figure definition statements, it is assumed that figure definition is performed as follows:

    C.sub.1 =x.sub.1, y.sub.1, r.sub.1

    S.sub.1 =P(x.sub.2,y.sub.2), P(x.sub.3,y.sub.3)

    C.sub.2 =S.sub.1, C.sub.1, 20, B, I, R

The defined figure elements are stored in the RAM 103 and displayed in the form of, for example, yellow lines on the CRT 106.

Under these conditions, assume that the circle C₂ among the group of figure elements displayed on the CRT 106 is to be modified. In such case, the "ELEMENT CORRECTION" (i.e., element revision) item 5a is picked from the table menu chart 108b. In response to selection of "ELEMENT CORRECTION" the processor displays the prompt "SELECT ELEMENT" on the CRT 106 and causes the graphic cursor GCS to be displayed on the CRT (step 201).

When graphic cursor GCS is positioned on the circle C₂, which is the element to be revised, in order to pick the same (step 202), the processor 102 causes the selected element, namely circle C₂, to be displayed in the form of a line type and color [e.g., a white, bold, solid line (FIG. 5)] different from those of the other figure elements (step 203) and then determines whether there is a figure element utilized in the definition of circle C₂ (step 204). If a utilized figure element (referred to as a "referential element") exists, the first referential element (straight line S₁ in the example) is displayed in the form of a different line type and color (e.g., a broken red line), and the second referential element (circle C₁ is the example), which is used in the definition of circle C₂, is displayed in the form of a different line and color (e.g., a solid red line (step 205). It should be noted that elements can be displayed upon changing only their color or line type to distinguish them.

A message M which includes the data necessary for element revision, namely the definition statements of the first referential element (straight line S₁) and second referential element (circle C₁) as well as such data as the radius used in the definition of the circle C₂, is displayed on the CRT 106 (step 206).

Thereafter, the operator makes the revision (step 207) upon referring to the figures and the message M displayed on the CRT 106. For example, if the radius of circle C₂ is to be revised from 20 to 25, the "20" of "R=20" (FIG. 5) is replaced by "35" by a prescribed operation at keyboard 105, and then the execute key is pressed. When this is done, the figure of the circle C₂ changes from a circle of radius 20 to a circle of radius 35, the color of the entire figure returns to yellow and the figure definition statement also changes to

    C.sub.2 =S.sub.1, C.sub.1, 34, B, I, R

In accordance with the present invention, a predetermined figure element is designated, the color and/or the type of line of the designated figure element are changed to display the element in a first mode, the color and/or the type of line of a referential element used in the definition of the designated figure element is changed to display the figure element in a second mode, and the referential element definition statement and data, such as a radius needed to define the designated figure element, are displayed on a display screen to perform the revision. As a result, revision of the figure element can be performed quickly and easily and, hence, the NC data obtained using the defined figure element can also be created quickly and easily. 

We claim:
 1. A figure element revising method for revising a figure element defined by a figure element definition statement in an automatic programming language, said method comprising the steps of:(a) displaying a group of previously defined figure elements; (b) designating a figure element as a figure element to be revised, and changing at least one of color and line type of the figure element to be revised to display the figure element to be revised in a first mode; (c) changing at least one of color and line type of a referential figure element used in defining the figure element to be revised to display the referential figure element in a second mode; (d) displaying the figure definition statement of the referential figure element on a display screen; and (e) revising the figure element to be revised upon referring to the display.
 2. A figure element revising method as recited in claim 1, wherein said displaying in step (d) includes displaying data used in the figure definition statement of the figure element to be revised, in addition to the figure definition statement of the figure element to be revised.
 3. A method for revising a figure element having a figure definition statement based on previously defined figure elements, said method comprising the steps of:(a) selecting a figure element to be revised form a plurality of previously defined figure elements; (b) distinguishably displaying the figure element selected in step (a) from the figure elements remaining in the plurality of previously defined figure elements; (c) determining if the figure element selected in step (a) has a figure definition statement based on at least one of the previously defined figure elements; (d) identifying, in dependence upon said determining in step (c), the at least one of the previously defined figure elements upon which the figure element selected in step (a) is based; (e) distinguishably displaying the at least one of the previously defined figure elements identified in step (d); and (f) revising the figure element selected in step (a) upon referring to information displayed in step (b) and (e) by revising the figure definition statement thereof.
 4. A method as recited in claim 3, wherein said displaying step (e) includes the step of displaying the figure definition statements corresponding to the at least one of the previously defined figure elements identified in step (d).
 5. A method as recited in claim 4, wherein said distinguishably displaying in steps (b) and (e) distinguishes the figure element by altering one of color and line type.
 6. A method as recited in claim 4, wherein said method further comprises the steps:(g) repeating steps (a)-(f) until all the figure elements needing revision have been revised; and (h) producing numerical control data from the figure definition statements of the figure elements.
 7. A method as recited in claim 4, wherein the method is used in an automatic programming system includes a display screen, andwherein said displaying in steps (b) and (e) occurs on the display screen.
 8. A method as recited in claim 7, wherein the automatic programming system includes a table device having a menu chart and cursor, and a graphic cursor is displayed on the display screen, andwherein said selecting in step (a) is performed by positioning the graphic cursor on the figure element to be selected by moving the cursor on the tablet device.
 9. A system for revising a figure element having a figure definition statement based on previously defined figure elements, comprising:display means for displaying figure elements and figure definition statements; input means for selecting a figure element to be revised from a plurality of previously defined figure elements; and control means for controlling revision of the figure element selected by said input means, said control means including first means for distinguishably displaying on said display means the figure element selected by said input means from the figure elements remaining in the plurality of previously defined figure elements; second means for determining if the figure element selected by said input means has a figure definition statement based on at least one of the previously defined figure elements, and for identifying the at least one of the previously defined figure elements upon which the figure element is selected is based; and third means for distinguishably displaying on said display means the at least one of the previously defined figure elements identified by said second means.
 10. A system as recited in claim 9, wherein the distinguishably displaying by said first and third means distinguishes the figure element by altering one of color and line type.
 11. A system as recited in claim 9, wherein said system is an automatic programming system, andwherein said input means comprises a table device having a menu chart and cursor.
 12. A system as recited in claim 11, wherein said display means includes a graphic cursor, andwherein said selecting by said input means is performed by positioning the graphic cursor on the figure element to be selected by moving the cursor on the tablet device. 